/* ************************************************************************



************************************************************************ */

qx.Class.define("HersPOS.ItemTable",
{
  extend : qx.ui.table.Table,

  construct : function()
  {
    //     var windowManager = new qx.ui.window.Manager();
    this.base(arguments);

    //   this.setLayout(new qx.ui.layout.Grid())
    //     this.table_win = new HersPOS.Table();
    this.setDecorator(null);
    this.setStatusBarVisible(false);

    //   default_font= new qx.bom.Font(28, ["Verdana", "sans-serif"])dd
    //     this.setDecorator(null);
    //   this.add(this.createTable(),{flex : 0})
    //     this.add(this,1);
    this.remoteDataModel = new HersPOS.ItemTableModel();
    this.remoteDataModel.colnames = [ "id", "Product Name", "Price", "Base Price" ];
    this.remoteDataModel.colIndex = [ "id", "name", "price", "base_price" ];

    this.setTableModel(this.remoteDataModel);
  },

  //     this._addSeparator("separator-vertical")
  //     this._add(this.footer,{flex : 0})
  //     this.table_win.open();
  members :
  {
    /**
     * TODOC
     *
     * @return {void} 
     */
    reload_model : function()
    {
      this.remoteDataModel.reloadData();
      this.fireEvent("reload_selbox");
    }
  },

  events :
  {
    "reload"        : "qx.event.type.Event",
    "reload_selbox" : "qx.event.type.Event"
  }
});